package com.zhang.teachingcommunity_spring.mapper.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Course {
    @TableId(value = "course_id",type = IdType.AUTO)
    private Integer courseId;
    private Integer schoolId;
    private String teacherId;

    private String coursedesc;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    private Timestamp examtime;
    private Integer subjectId;
    private String moocLink;
    @TableField(exist = false)
    private Subject subject;
    private String coursename;
    @TableField(exist = false)
    private User user;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS")
    private Timestamp createTime;
    private String courseImg;
}
